;---------------------------------------------------------------------------
;Hook Toss
[Statedef 1000]
type    = S
movetype= I
physics = S
poweradd = 80-80*var(53)
velset = 0,0
anim = 1000+(3*Cond(Var(44) && !Var(59),NumExplod(90000200) != 0,NumExplod(90000230) != 0))
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1000, 1]
type = VarSet
trigger1 = !Time
var(10) = Cond(Var(44) && !Var(59),NumExplod(90000200) != 0,NumExplod(90000230) != 0)

[State 1000, 2]
type = ChangeAnim
trigger1 = !var(59) && Var(10) && AnimElem = 4 && Cond(Var(44),Command != "holdx", Cond(Var(10),Command != "holdb",Command != "holda"))
value = 1003
elem = 6

[State 1000, 4]
type = ChangeAnim
trigger1 = !var(59) && !Var(10) && AnimElem = 6 && Cond(Var(44),Command != "holdy", Cond(Var(10),Command != "holda",Command != "holdb"))
value = 1000
elem = 8

[State 1000, 5]
type = ChangeAnim
trigger1 = !var(59) && Cond(Var(10), AnimElemTime(4) = 0 || AnimElemTime(6) = 0, AnimElemTime(6) = 0 || AnimElemTime(8) = 0) && Cond(Var(44),Command = "holdx" || Command = "holdy", Cond(Var(10),Command = "holda" ,Command = "holdb"))
trigger2 = var(59) && AnimElemTime(7) = 3 && P2StateType = A
value = 1000+(3*Var(10))
elem = Cond(Var(10),4,6)

[State 1000, 6]
type = ChangeAnim
trigger1 = !var(59) && Cond(Var(10), (AnimElemTime(4) >= 0 && AnimElemTime(6) < 0), (AnimElemTime(6) >= 0 && AnimElemTime(8) < 0)) && Cond(Var(44),Command = "relx" || Command = "rely", Cond(Var(10),Command = "rela",Command = "relb"))
trigger2 = var(59) && (AnimElemTime(6) >= 0 && AnimElemTime(8) < 0) && !P2StateType = A
value = 1000+(3*Var(10))
elem = Cond(Var(10),6,8)

[State 1001, 7]
type = Helper
trigger1 = AnimElemTime(8-(Var(10)*2)) = 1
name = "Hook"
ID = 1000
stateno = 1020
pos = ceil(29*const(size.xscale)),ceil(-16*const(size.yscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1000, 8]
type = ChangeState
trigger1 = Numhelper(1000)
trigger1 = helper(1000), NumTarget && helper(1000),MoveGuarded = 0
value = 1001
ignorehitpause = 1

[State 1000, 9]
type = StateTypeSet
trigger1 = AnimElemTime(8-(Var(10)*2)) = 0
movetype = A

[State 1000, 10]
type = StateTypeSet
trigger1 = AnimElemTime(8-(Var(10)*2)) = 1
movetype = I

[State 1000, 11]
type = PlaySnd
trigger1 = AnimElem = 4 || (!Var(10) && AnimElem = 6)
value = F0,1

[State 1000, 12]
type = PlaySnd
trigger1 = Cond(Var(10), AnimElem = 6,0, AnimElem = 8,0)
value = S1000,0
persistent = 0

[State 1000, 13]
type = ChangeAnim
trigger1 = !var(59) && (Var(10) && (AnimElem = 4 || AnimElem = 5) || !Var(10) && (AnimElem = 6 || AnimElem = 7))
trigger1 = Cond(Var(44), (NumExplod(90000230) || NumExplod(90000240)),Cond(Var(10),NumExplod(90000240),NumExplod(90000230)))
trigger2 = var(59) && (AnimElem = 4 || AnimElem = 5) && P2BodyDist X < 75
value = 1000+(3*Var(10))
elem = 7+(2*(!Var(10)))

[State 1000, 14]
type = Width
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
value = 20,0

[State 1000, 15]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8030
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1000, 16]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8030
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1000, 17]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1000, 18]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1 
;---------------------------------------------------------------------------
;Hook Toss (Caught)
[Statedef 1001]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1001
ctrl = 0
sprpriority = 2

[State 1001, 1]
type = VarAdd
trigger1 = !Time && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1001, 2]
type = ChangeAnim
trigger1 = !NumTarget && Time > 18 && RoundState = 2
value = 1001
elem = 3

[State 1001, 3]
type = PosAdd
trigger1 = !Time && FrontEdgeDist < 25
x = -58*const(size.xscale)

[State 1001, 4]
type = Width
trigger1 = !Time
edge = 50,0

[State 1001, 5]
type = PlaySnd
trigger1 = !Time
value = S181,2
persistent = 0

[State 1021, 6]
type = PowerAdd
trigger1 = !Time && PrevStateNo != 1010
value = 180
ignorehitpause = 1

[State 1001, 7]
type = ChangeState
trigger1 = Cond(NumHelper(1000),(helper(1000),StateNo = [1022,1024]),0)
value = 1002+Cond(PrevStateNo = 1010,9,Var(10)*2)

;---------------------------------------------------------------------------
;Hook Toss (Caught)
[Statedef 1002]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1002
ctrl = 0
sprpriority = 2

[State 1002, 1]
type = SprPriority
trigger1 = AnimElem = 1
value = -3

[State 1002, 2]
type = SprPriority
trigger1 = AnimElem = 3
value = 2

[State 1002, 3]
type = ScreenBound
trigger1 = 1
value = 0

[State 1002, 4]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1002, 5]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1002, 6]
type = ChangeState
trigger1 = !AnimTime
trigger2 = RoundState != 2 && AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Hook Toss (Caught)
[Statedef 1004]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1004
ctrl = 0
sprpriority = 2

[State 1004, 1]
type = SprPriority
trigger1 = AnimElem = 1
value = -3

[State 1004, 2]
type = SprPriority
trigger1 = AnimElem = 2
value = 2

[State 10024, 3]
type = ScreenBound
trigger1 = 1
value = 0

[State 1004, 4]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1004, 5]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1004, 6]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Hook Toss (Air)
[Statedef 1005]
type    = A
movetype= A
physics = N
poweradd = 80
anim = 1005
ctrl = 0
sprpriority = 2

[State 1005, 1]
type = VarSet
trigger1 = !Time
fvar(10) = Vel X

[State 1005, 2]
type = VelSet
trigger1 = !Time
x = 0
y = 0

[State 1005, 3]
type = HitDef
trigger1 = AnimElem = 5
attr = A, ST
damage = ceil(20*Fvar(20)),5
animtype = Hard
getpower = 120,60
givepower = 60,30
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,2
sparkno = -1
sparkxy = 0,0
hitsound = F5,1
guardsound = F6, 0
ground.type = Low
guard.slidetime = 18
guard.hittime = 18
ground.velocity = -4.6*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.hittime = 100
air.velocity = -3.1*const(size.xscale), -2.2*const(size.yscale)
air.hittime = 100
fall = 0
fall.recovertime = 1
kill = 0
p1stateno = 1006
p2stateno = 1031
id = 1005

[State 1005, 4]
type = VarSet
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(5) < 4
var(14) = AnimElemNo(0) % 5

[State 1005, 5]
type = VelSet
trigger1 = Time = 22
x = fvar(10)

[State 1005, 6]
type = VelAdd
trigger1 = Time >= 22
y = .44*const(size.yscale)

[State 1005, 7]
type = StateTypeSet
trigger1 = AnimElem = 9
movetype = I

[State 1005,8]
type = PlaySnd
trigger1 = AnimElem = 4
value = S1000,0
channel = 0

[State 1005, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8030
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1005, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8030
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1005, 11]
type = RemoveExplod
trigger1 = AnimElem = 7
id = 8030

[State 1005, 12]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y && AnimElemTime(10) >= 0
value = 1009
;---------------------------------------------------------------------------
;Hook Toss (Air)(Caught)
[Statedef 1006]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1006
ctrl = 0
sprpriority = -3

[State 1006, 1]
type = VarAdd
trigger1 = !Time && Fvar(21) > .3
fvar(21) = -0.1
persistent = 0

[State 1006, 2]
type = Explod
trigger1 = !Time
anim = 6000
ID = 6000
pos = ceil((42+(16*Var(14)))*const(size.xscale)),ceil((1+(16*Var(14)))*const(size.yscale))
postype = p1
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1
ignorehitpause = 1

[State 1006, 3]
type = Explod
trigger1 = !Time
anim = 1026+Var(14)
ID = 1005
pos = ceil(26*const(size.xscale)),ceil(-9*const(size.yscale))
postype = P1  ;P2, Front, Back, Left, Right
facing = 1
vfacing = 1
bindtime = 1
removetime = 5
scale = 1,1
sprpriority = 3
removeongethit = 1

[State 1006, 4]
type = Explod
trigger1 = AnimElem = 2
anim = 1026+Var(14)
ID = 1005
pos = ceil(12*const(size.xscale)),ceil(-23*const(size.yscale))
postype = P1  ;P2, Front, Back, Left, Right
facing = 1
vfacing = 1
bindtime = 1
removetime = 3
scale = 1,1
sprpriority = 3
removeongethit = 1
ignorehitpause = 1

[State 1006, 5]
type = VarSet
trigger1 = !Time
fvar(10) = abs(target,Pos X - Pos X)

[State 1006, 6]
type = VarSet
trigger1 = !Time
fvar(11) = abs(target,Pos Y - Pos Y)

[State 1006, 7]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
time = 1
id = 1005
pos = fvar(10),fvar(11)

[State 1006, 8]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
time = 1
id = 1005
pos = fvar(10),fvar(11)

[State 1006,9]
type = TargetVelSet
trigger1 = NumTarget && AnimElem = 3
x = 8.4
y = -5.5
ID = -1

[State 1006, 10]
type = PlaySnd
trigger1 = !Time
value = S181,2
persistent = 0

[State 1006, 11]
type = PalFX
trigger1 = PrevStateNo = 1015 && !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1006, 12]
type = ChangeState
trigger1 = AnimElemTime(3) >= 0 && abs(target(1005),Pos X - (Pos X)) < 10
value = 1007+(9*(PrevStateNo = 1015))
;---------------------------------------------------------------------------
;Hook Toss (Air)(Caught)
[Statedef 1007]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1007
ctrl = 0
sprpriority = -3

[State 1007, 1]
type = TargetState
trigger1 = NumTarget && !Time
value = 1035

[State 1007, 2]
type = TargetBind
trigger1 = Anim = 1007 && AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = -3*const(size.xscale),-20*const(size.yscale)
time = 5

[State 1007, 3]
type = TargetBind
trigger1 = Anim = 1007 && AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = -8*const(size.xscale),-12*const(size.yscale)
time = 5

[State 1007, 4]
type = TargetBind
trigger1 = Anim = 1007 && AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = 8*const(size.xscale),-30*const(size.yscale)
time = 5

[State 1007, 5]
type = TargetBind
trigger1 = Anim = 1007 && AnimElemTime(4) >= 0
pos = 36*const(size.xscale), 12*const(size.yscale)
time = 1

[State 1007, 6]
type = SprPriority
trigger1 = Anim = 1007 && (AnimElem = 2 || AnimElem = 4)
value = 3

[State 1007, 7]
type = SprPriority
trigger1 = Anim = 1007 && AnimElem = 3
value = -3

[State 1007, 8]
type = VelSet
trigger1 = Anim = 1007 && AnimElem = 1
y = -5.3*const(size.yscale)

[State 1007, 9]
type = VelAdd
trigger1 = (AnimElemTime(1) >= 0 && Pos Y < -14 && Anim != 43) || Anim = 43
y = .44*const(size.yscale)

[State 1007, 10]
type = PlaySnd
trigger1 = !Time
value = S1000,1
channel = 0

[State 1007, 11]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1007, 12]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1008

;---------------------------------------------------------------------------
;Hook Toss (Air)(Caught)
[Statedef 1008]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1008
ctrl = 0
sprpriority = 3

[State 1007, 1]
type = TargetLifeAdd
trigger1 = NumTarget && !Time
value = ceil(-80*Fvar(20))

[State 1007, 12]
type = TargetState
trigger1 = NumTarget && !Time
value = 1038

[State 0, PosSet]
type = PosSet
trigger1 = NumTarget && !Time
y = -8

[State 1007, 15]
type = VelSet
trigger1 = AnimElem = 4
x = -1.1*const(size.xscale)
y = -4.5*const(size.yscale)
persistent = 0

[State 1007, 9]
type = VelAdd
trigger1 = AnimElemTime(4) >= 0
y = .44*const(size.yscale)

[State 1007, 20]
type = HitAdd
trigger1 = !Time
value = 1

[State 1007, 22]
type = RemoveExplod
trigger1 = AnimElemTime(4) >= 0 && Vel Y > 0 && Pos Y > -Vel Y
id = 8030

[State 1007, 23]
type = ChangeState
trigger1 = AnimElemTime(4) >= 0 && Vel Y > 0 && Pos Y > -Vel Y
value = 1009

;---------------------------------------------------------------------------
;Land
[Statedef 1009]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 1009
sprpriority = 2

[State 1009, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 1009, 2]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;EX Hook Toss
[Statedef 1010]
type    = S
movetype= I
physics = S
poweradd = -500
velset = 0,0
anim = 1010
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1010, 1]
type = VarSet
trigger1 = !Time
var(10) = 0

[State 1010, 2]
type = ChangeAnim
trigger1 = (AnimElemTime(4) >= 0 && AnimElemTime(6) < 0) && Cond(Var(44),Command != "holdx" && Command != "holdy", Command != "holda" && Command != "holdb")
value = 1010
elem = 6

[State 1010, 3]
type = Helper
trigger1 = AnimElemTime(6) = 1
name = "Hook"
ID = 1000
stateno = 1020
pos = ceil(29*const(size.xscale)),ceil(-16*const(size.yscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1010, 4]
type = ChangeAnim
trigger1 = !var(59) && AnimElemTime(6) = 0 && Cond(Var(44),Command = "holdx" || Command = "holdy", Command = "holdb" || Command = "holda")
value = 1010
elem = 4

[State 1010, 5]
type = ChangeState
trigger1 = Numhelper(1000)
trigger1 = helper(1000), NumTarget && helper(1000),MoveGuarded = 0
value = 1001
ignorehitpause = 1

[State 1010, 6]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = A

[State 1010, 7]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 1010, 8]
type = Width
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
value = 20,0

[State 1010, 9]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1010, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8034
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1010, 11]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8034
ID = 8030
pos = 223,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1010, 12]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1010, 13]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1010, 14]
type = PlaySnd
trigger1 = AnimElem = 6
value = S1000,0

[State 1010, 15]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0,1

[State 1010, 16]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1 
;---------------------------------------------------------------------------
;EX Hook Toss (Caught)
[Statedef 1011]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 1011
ctrl = 0
sprpriority = 2

[State 1011, 1]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 12
value = F7,2

[State 1011, 2]
type = SprPriority
trigger1 = AnimElem = 1 || AnimElem = 5 || AnimElem = 9
value = -3

[State 1011, 3]
type = SprPriority
trigger1 = AnimElem = 2 || AnimElem = 11
value = 2

[State 1011, 4]
type = Width
trigger1 = !Time
edge = 0,50

[State 1011, 5]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1011, 6]
type = PosAdd
trigger1 = !Time && FrontEdgeDist < 22
x = -58*const(size.xscale)

[State 1011, 7]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1011, 8]
type = PlaySnd
trigger1 = AnimElem = 1
value = S1000,1
channel = 0

[State 1011, 9]
type = PlaySnd
trigger1 = AnimElem = 8
value = F720,0

[State 1011, 10]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1011, 11]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;EX Hook Toss (air)
[Statedef 1015]
type    = A
movetype= A
physics = N
poweradd = -500
anim = 1015
ctrl = 0
sprpriority = 2

[State 1015, 1]
type = VarSet
trigger1 = !Time
fvar(10) = Vel X

[State 1015, 2]
type = VelSet
trigger1 = !Time
x = 0
y = 0

[State 1015, 3]
type = HitDef
trigger1 = AnimElem = 5
attr = A, ST
damage = ceil(20*Fvar(20)),5
animtype = Hard
getpower = 0,0
givepower = 60,30
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,2
sparkno = -1
sparkxy = 0,0
hitsound = F5,1
guardsound = F6, 0
ground.type = Low
guard.slidetime = 18
guard.hittime = 18
ground.velocity = -4.6*const(size.xscale)
ground.cornerpush.veloff = 0
kill = 1
air.type = Low
air.hittime = 100
air.velocity = -3.1*const(size.xscale), -2.2*const(size.yscale)
air.type = Low
air.velocity = -2.4,-3
air.hittime = 100
fall = 0
fall.recovertime = 1
p1stateno = 1006
p2stateno = 1031
id = 1005

[State 1015, 4]
type = VarSet
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(9) < 0
var(14) = AnimElemNo(0) % 5

[State 1005, 5]
type = VelSet
trigger1 = Time = 18
x = fvar(10)

[State 1015, 6]
type = VelAdd
trigger1 = Time >= 18
y = .44*const(size.yscale)

[State 1015, 7]
type = StateTypeSet
trigger1 = AnimElem = 9
movetype = I

[State 1015, 8]
type = PlaySnd
trigger1 = AnimElem = 4
value = S1000,0
channel = 0

[State 1015, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8034
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1015, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8034
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1015, 11]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1015, 12]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1015, 13]
type = RemoveExplod
trigger1 = AnimElem = 11
id = 8030

[State 1015, 14]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y && AnimElemTime(11) >= 0
value = 1009
;---------------------------------------------------------------------------
;Hook Toss (Air)(Caught)
[Statedef 1016]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1017
ctrl = 0
sprpriority = 2

[State 1016, 1]
type = VarAdd
trigger1 = !Time && Fvar(21) > .3
fvar(21) = -0.1
persistent = 0

[State 1016, 2]
type = TargetState
trigger1 = NumTarget && AnimElem = 1
value = 1037

[State 1015, 3]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = -3*const(size.xscale),-20*const(size.yscale)

[State 1015, 4]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = -20*const(size.xscale),-46*const(size.yscale)

[State 1015, 5]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = -8*const(size.xscale), -58*const(size.yscale)

[State 1062, 6]
type = TargetBind
trigger1 = AnimElem = 4
pos = 1*const(size.xscale),6*const(size.yscale)

[State 1015, 7]
type = SprPriority
trigger1 = AnimElem = 1 || AnimElem = 4
value = -3

[State 1015, 8]
type = SprPriority
trigger1 = AnimElem = 2
value = 2

[State 1015, 9]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 4
y = -5.6*const(size.yscale)

[State 1016, 10]
type = VelAdd
trigger1 = AnimElemTime(1) >= 0
y = .44*const(size.yscale)

[State 1015, 11]
type = PlaySnd
trigger1 = AnimElem = 1
value = S1000,1
channel = 0

[State 1015, 12]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0,2

[State 1015, 13]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1015, 14]
type = RemoveExplod
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
id = 8030

[State 1015, 15]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1015, 16]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1009

;-------------------------------------------------------------------------
;Hook (Ground)
[Statedef 1020]
type    = S
movetype= A
physics = N
anim = 1020
ctrl = 0
velset = 16*const(size.xscale),0

[State 1020, 1]
type = PlaySnd
trigger1 = Vel X = 0
value = S181,2
persistent = 0

[State 1020, 2]
type = Explod
trigger1 = Time > 0 && Vel X > 0
anim = 911+1*(Time % 2 = 0)
ID = 1003
pos = ceil((-16*(Time))*const(size.xscale)),0
postype = p1
bindtime = -1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ignorehitpause = 1

[State 1020, 3]
type = HitDef
triggerall = parent,MoveType != H
trigger1 = parent,var(5) < 6 && !Time
attr = A, ST
damage = ceil(20*root,Fvar(20)),5
animtype = Hard
getpower = 0,0
givepower = 90, 45
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = S6000
sparkxy = 0,0
hitsound = F5,1
guardsound = F6, 0
ground.type = Low
guard.slidetime = 18
guard.hittime = 18
ground.velocity = -4.6*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.hittime = 100
air.velocity = -3.1*const(size.xscale), -2.2*const(size.yscale)
fall.recover = 0
fall.recovertime = 1
p1stateno = 1021
p2stateno = 1030
id = 1001
chainID = -1
nochainID = -1
hitonce = 1
kill = 0
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1020, 5]
type = RemoveExplod
trigger1 = ((!(root,Var(10)) && Time = 10) || (root,Var(10) && Time = 6)) && Vel X > 0
trigger2 = (root,StateNo != [1000,1019]) || root,MoveType = H
id = 1003
ignorehitpause = 1

[State 1020, 6]
type = DestroySelf
trigger1 = ((!(root,Var(10)) && Time = 10) || (root,Var(10) && Time = 6)) && Vel X > 0
trigger2 = (root,StateNo != [1000,1019]) || root,MoveType = H
;-------------------------------------------------------------------------
;Hook Caught (Ground)
[Statedef 1021]
type    = S
movetype= A
physics = N
anim = 1020
ctrl = 0
velset = 0,0

[State 1021, 1]
type = VelSet
trigger1 = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
x = 0
ignorehitpause = 1

[State 1021, 2]
type = PosAdd
trigger1 = (parent,StateNo = 1001 || parent,StateNo = 1011 || parent,StateNo = 3001) && parent,AnimElem = 2
trigger2 = FrontEdgeDist < 20
x = -20*const(size.xscale)
persistent = 0

[State 1021, 3]
type = RemoveExplod
trigger1 = (parent,StateNo = 1001 || parent,StateNo = 1011 || parent,StateNo = 3001) && (parent,AnimElemTime(3) > 0)
id = 1003
ignorehitpause = 1

[State 1021, 4]
type = AssertSpecial
trigger1 = (parent,StateNo = 1001  && parent,Time > 17 || parent,StateNo = 1002 || parent,StateNo = 1011 && parent,Time > 17 || (parent,StateNo = 3001 && parent,Time > 17 || parent,StateNo = 3002 && parent,Time > 17))
flag = invisible

[State 1021, 5]
type = TargetBind
trigger1 = NumTarget && (parent,StateNo = 1001 || parent,StateNo = 1002 || parent,StateNo = 1011 || parent,StateNo = 3001)
pos = 4*const(size.xscale),16*const(size.yscale)

[State 1021, 6]
type = VelSet
trigger1 = NumTarget && (parent,StateNo = 1001 || parent,StateNo = 1011 || parent,StateNo = 3001) && parent,AnimElem = 3
x = -8.4
y = -5.5
persistent = 0

[State 1021, 7]
type = VelAdd
trigger1 = NumTarget && (parent,StateNo = 1001 || parent,StateNo = 1011 || parent,StateNo = 3001) && (parent,AnimElemTime(3) >= 0)
x = 0
y = .44

[State 1021, 8]
type = TargetFacing
triggerall = NumTarget
trigger1 = Facing = target,Facing && target,StateNo = 1003
value = -1

[State 1021, 9]
type = BindToParent
triggerall = NumTarget && FrontEdgeDist < -5
trigger1 = target,StateNo = 1033
pos = 60,Pos Y
ignorehitpause = 1
persistent = 0

[State 1021, 10]
type = TargetState
trigger1 = NumTarget && (root,StateNo != [1000,1019]) || root,MoveType = H
value = 5050

[State 1021, 11]
type = VarSet
trigger1 = 1
var(1) = Cond(NumTarget,target,Alive = 0,0)

[State  1021, 12]
type = ChangeState
trigger1 = (root,StateNo != [1000,1019]) || root,MoveType = H
value = 1025

[State  1021, 13]
type = ChangeState
trigger1 = ParentDist X > -20
value = 1023 + Cond(root,PrevStateNo = 1010,1,root,Var(10)*-1)

;-------------------------------------------------------------------------
;Hook Throw (Light Hook Toss)
[Statedef 1022]
type    = S
movetype= A
physics = N
anim = 1
ctrl = 0
velset = 0,0

[State 1023, 1]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,0

[State 1023, 2]
type = TargetState
trigger1 = !Time
value = 1032

[State 1023, 3]
type = TargetBind
trigger1 = root,StateNo = 1004 && root,AnimElem = 1
pos = -20*const(size.xscale),-26*const(size.yscale)

[State 1023, 4]
type = TargetBind
trigger1 = root,StateNo = 1004 && root,AnimElem = 2
pos = 22*const(size.xscale),-19*const(size.yscale)

[State 1023, 5]
type = TargetBind
trigger1 = root,StateNo = 1004 && root,AnimElem = 3
pos = 33*const(size.xscale),-2

[State 1023, 6]
type = PlaySnd
trigger1 = root,StateNo = 1004 && root,AnimElem = 3
value = F7,2

[State 1023, 7]
type = EnvShake
trigger1 = root,StateNo = 1004 && root,AnimElem = 3
time = 8
freq = 45
ampl = -15

[State 1023, 8]
type = TargetLifeAdd
trigger1 = root,StateNo = 1004 && root,AnimElem = 3
value = ceil(-80*root,Fvar(20))

[State 1023, 9]
type = HitAdd
trigger1 = root,StateNo = 1004 && root,AnimElem = 3
value = 1

[State 1023, 10]
type = PlaySnd
trigger1 = root,StateNo = 1004 && root,AnimElem = 1
value = S1000,1

[State 1023, 11]
type = DestroySelf
trigger1 = !NumTarget

;-------------------------------------------------------------------------
;Hook Throw (Strong Hook Toss)
[Statedef 1023]
type    = S
movetype= A
physics = N
anim = 1
ctrl = 0
velset = 0,0

[State 1023, 1]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,0

[State 1023, 2]
type = TargetState
trigger1 = !Time
value = 1033

[State 1023, 3]
type = TargetBind
trigger1 = root,StateNo = 1002 && root,AnimElem = 1
pos = -7*const(size.xscale),-46*const(size.yscale)

[State 1023, 4]
type = TargetBind
trigger1 = root,StateNo = 1002 && root,AnimElem = 2
pos = 0*const(size.xscale),-24*const(size.yscale)

[State 1023, 4]
type = TargetBind
trigger1 = root,StateNo = 1002 && root,AnimElem = 3
pos = 12*const(size.xscale),-29*const(size.yscale)

[State 1023, 5]
type = TargetBind
trigger1 = root,StateNo = 1002 && root,AnimElem = 4
pos = 38*const(size.xscale),0

[State 1023, 6]
type = PlaySnd
trigger1 = root,StateNo = 1002 && root,AnimElem = 4
value = F7,2

[State 1023, 7]
type = EnvShake
trigger1 = root,StateNo = 1002 && root,AnimElem = 4
time = 18
freq = 90
ampl = -15

[State 1023, 8]
type = TargetLifeAdd
trigger1 = root,StateNo = 1002 && root,AnimElem = 4
value = ceil((-100*root,Fvar(20)))

[State 1023, 9]
type = HitAdd
trigger1 = root,StateNo = 1002 && root,AnimElem = 4
value = 1

[State 1023, 10]
type = PlaySnd
trigger1 = root,StateNo = 1002 && root,AnimElem = 1
value = S1000,1

[State 1023, 11]
type = DestroySelf
trigger1 = !NumTarget

;-------------------------------------------------------------------------
;Hook Throw (EX Hook Toss)
[Statedef 1024]
type    = S
movetype= A
physics = N
anim = 1
ctrl = 0
velset = 0,0

[State 1024, 1]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,0

[State 1024, 2]
type = TargetState
trigger1 = NumTarget && !Time
value = 1036

[State 1024, 3]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 1
pos = -2*const(size.xscale),-45*const(size.yscale)

[State 1024, 4]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 2
pos = -26*const(size.xscale),-22*const(size.yscale)

[State 1024, 5]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 3
pos = -47*const(size.xscale),14*const(size.yscale)
time = 1

[State 1024, 6]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 8
pos = -47*const(size.xscale),0*const(size.yscale)

[State 1024, 7]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 9
pos = -2*const(size.xscale),-44*const(size.yscale)

[State 1024, 8]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 10
pos = -2*const(size.xscale),-27*const(size.yscale)

[State 1024, 9]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 11
pos = 9*const(size.xscale),-8*const(size.yscale)

[State 1024, 10]
type = TargetBind
trigger1 = root,StateNo = 1011 && root,AnimElem = 12
pos = 31*const(size.xscale),0

[State 1024, 11]
type = EnvShake
trigger1 = root,StateNo = 1011 && (root,AnimElem = 3 || root,AnimElem = 12)
time = 18-(10*(root,AnimElem = 3))
freq = 90-(45*(root,AnimElem = 3))
ampl = -15

[State 1024, 12]
type = TargetLifeAdd
trigger1 = root,StateNo = 1011 && (root,AnimElem = 3 || root,AnimElem = 12)
value = ceil((-65*root,Fvar(21)))

[State 1024, 13]
type = HitAdd
trigger1 = root,StateNo = 1011 && (root,AnimElem = 3 ||root, AnimElem = 12)
value = 1

[State 1024, 14]
type = DestroySelf
trigger1 = !NumTarget
;-------------------------------------------------------------------------
;Hook (Remove)
[Statedef 1025]
type    = S
movetype= A
physics = N
anim = 1
ctrl = 0
velset = 0,0

[State 1020, 5]
type = RemoveExplod
trigger1 = ((!(root,Var(10)) && Time = 10) || (root,Var(10) && Time = 6)) && Vel X > 0
trigger2 = (root,StateNo != [1000,1019]) || root,MoveType = H
id = 1003
ignorehitpause = 1

[State 0, TargetState]
type = TargetState
trigger1 = !Time
value = 1026
ID = -1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !NumTarget
;-------------------------------------------------------------------------
;Ground Hook Dropped
[Statedef 1026]
type    = S
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 1026, SelfState]
type = SelfState
trigger1 = 1
value = 5050

;-------------------------------------------------------------------------
;Caught By Ground Hook
[Statedef 1030]
type    = S
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 1030, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1030

[State 1030, 2]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A

[State 1030, 3]
type = ScreenBound
trigger1 = 1
value = 0

[State 1030, 4]
type = VelAdd
trigger1 = AnimElemTime(3) >= 0
y = .44

;-------------------------------------------------------------------------
;Caught By Air Hook
[Statedef 1031]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = -2

[State 1008, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1031

;-------------------------------------------------------------------------
;Caught By Light Hook Toss
[Statedef 1032]
type    = A
movetype= H
physics = S
ctrl = 0
velset = 0,0

[State 1032, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1032

[State 1032, 2]
type = NotHitBy
trigger1 = 1
value = SCA,AT
time = 1

[State 1032, 3]
type = VelSet
trigger1 = Time = 23
x = -2

[State 1032, 4]
type = ScreenBound
trigger1 = 1
value = 0

[State 1032, 5]
type = SelfState
trigger1 = (Life || !SelfAnimExist(5600)) && Time = 23
value = 5101

[State 1032, 5]
type = SelfState
trigger1 = (!Life && SelfAnimExist(5600)) && Time = 23
value = 5600
;-------------------------------------------------------------------------
;Caught By Strong Hook Toss
[Statedef 1033]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 1033, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1033

[State 1033, 2]
type = NotHitBy
trigger1 = 1
value = SCA,AT
time = 1

[State 1033, 3]
type = VelSet
trigger1 = Time = 18
x = -3.2

[State 1033, 4]
type = VelMul
trigger1 = Life && Time >= 18
x = 0.85

[State 1033, 5]
type = SelfState
trigger1 = Time = 24
value = 5810

;-------------------------------------------------------------------------
;Caught By Strong Air Hook Toss
[Statedef 1035]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = -2

[State 1035, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1035

[State 1035, 2]
type = Turn
trigger1 = AnimElem = 2

;-------------------------------------------------------------------------
;Caught by Dig Dug (EX Hook Toss)
[Statedef 1036]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 1036, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1036
ignorehitpause = 1

[State 1036, 2]
type = ChangeAnim
trigger1 = Time = 73
value = 5100

[State 1036, 3]
type = NotHitBy
trigger1 = 1
value = SCA,AT
time = 1

[State 1036, 4]
type = ScreenBound
trigger1 = 1
value = 0

[State 1036, 5]
type = VelSet
trigger1 = Anim = 1036 && Time = 22
y = -7

[State 1036, 6]
type = VelAdd
trigger1 = Anim = 1036 && (Time > 22 && Time < 53)
y = .44
 
[State 1036, 7]
type = VelSet
trigger1 = Anim = 1036 && AnimElem = 15
y = 0
 
[State 1036, 8]
type = VelSet
trigger1 = Anim = 1036 && AnimElem = 14
y = 0

[State 1036, 9]
type = VelSet
trigger1 = Time = 85
x = -4.1

[State 1036, 10]
type = StateTypeSet
trigger1 = Time = 85
statetype = L       
physics = S

[State 1036, 11]
type = ScreenBound
trigger1 = 1
value = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 92
value = F8,0

[State 1036, 12]
type = ChangeAnim
trigger1 = Life && Time = 92
value = 5110

[State 1036, 13]
type = SelfState
trigger1 = Life && Time = 122
value = 5120
 
[State 1036, 14]
type = SelfState
trigger1 = !Life && Time = 92
value = 5110
;-------------------------------------------------------------------------
;P2 Caught by EX Air Hook Toss
[Statedef 1037]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = -3

[State 1037, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1037

[State 1037, 2]
type = VelSet
trigger1 = AnimElemTime(4) >= 1
x = 0
y = 15.3

[State 1037, 3]
type = VelAdd
trigger1 = AnimElemTime(4) >= 1
y = .44

[State 1037, 4]
type = LifeAdd
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = -110
kill = 1
persistent = 0

[State 1037, 5]
type = EnvShake
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
time = 18
freq = 90
ampl = -15

[State 1037, 6]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5100
;-------------------------------------------------------------------------
;Hit Ground
[Statedef 1038]
type    = L
movetype= H
physics = N
ctrl = 0
velset = 0,0

[State 1038, 6]
type = ChangeAnim
trigger1 = !Time
value = 5100

[State 1038, 1]
type = EnvShake
trigger1 = !Time
time = 18
freq = 90
ampl = -15

[State 1038, 2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1039, 3]
type = PosSet
trigger1 = !Time
y = 0

[State 1039, 4]
type = PlaySnd
trigger1 = !Time
value = F7,2

[State 1039, 5]
type = SelfState
trigger1 = Time = 26 && (!Life && SelfAnimExist(5600))
value = 5600

[State 1039, 6]
type = ChangeState
trigger1 = Time = 21 && (Life || !SelfAnimExist(5600))
value = 1039
;-------------------------------------------------------------------------
;Ground Bounce
[Statedef 1039]
type    = L
movetype= H
physics = N
ctrl = 0
velset = 1,-2.5

[State 1038, 1]
type = ChangeAnim
trigger1 = !Time
value = 5101

[State 1038, 2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1038, 3]
type = VelAdd
trigger1 = 1
y = .4

[State 1039, 4]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= 12
value = 5810

;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1050]
type    = S
movetype= A
physics = S
velset = 0,0
poweradd = 80
ctrl = 0
anim = 1050+3*(Cond(Var(44), NumExplod(90000210) != 0,NumExplod(90000240) != 0))
sprpriority = 2
facep2 = 1

[State 1050, 1]
type = VarSet
trigger1 = !Time
var(10) = ((!var(59) && Cond(Var(44), NumExplod(90000210) != 0,NumExplod(90000240) != 0)) || (Var(59) && Random < 350))

[State 1050, 2]
type = HitDef
Trigger1 = P2MoveType != H && AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
attr = S, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 1051+(2*Var(10))
p2stateno = 1052+(3*Var(10))
guard.dist = 0
fall = 1
fall.recovertime = 1
numhits = 0

[State 1050, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = F720,0

[State 1050, 54]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 1050, 6]
type = ChangeAnim
trigger1 = !Time && Var(10)
value = 1053

[State 1050, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8031
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1050, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8031
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1050, 7]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1050, 8]
type = ChangeState
Trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1051]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1051
sprpriority = 2

[State 1051, 1]
type = VarAdd
trigger1 = !Time && Fvar(21) > .3
fvar(21) = -0.15
ignorehitpause = 1
persistent = 0

[State 1051, 2]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(4) < 0
trigger2 = AnimElemTime(8) >= 0 && AnimElemTime(8) <= 9
pos = 26,0

[State 1051, 3]
type = Explod
trigger1 = AnimElem = 4 || AnimElem = 8
anim = 6001
ID = 6000
pos = ceil((28-12*(AnimElem = 8))*const(size.xscale)),ceil((-14-14*(AnimElem = 8))*const(size.yscale))
postype = p1
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1

[State 1051, 4]
type = TargetLifeAdd
trigger1 = (AnimElem = 4 || AnimElem = 8) && !Var(10)
value = ceil((-100+50*(AnimElem = 8))*FVar(20))

[State 1051, 5]
type = TargetLifeAdd
trigger1 = (AnimElem = 4 || AnimElem = 8) && Var(10)
value = ceil((-100+20*(AnimElem = 8)*FVar(20)))

[State 1051, 6]
type = PowerAdd
trigger1 = !Time
value = 180 + 30 * Var(10)

[State 1051, 7]
type = PlaySnd
trigger1 = AnimElem = 4
value = F5,3

[State 1051, 8]
type = PlaySnd
trigger1 = AnimElem = 8
value = F5,2

[State 1051, 9]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1051, 10]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1051, 11]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1052]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 1052, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1052

[State 1052, 2]
type = VelSet
trigger1 = AnimElem = 4
y = -6.75

[State 1052, 3]
type = VelSet
trigger1 = AnimElem = 24
x = -1.3
y = -8.6

[State 1051, 6]
type = EnvShake
trigger1 = AnimElem = 4
time = 18
freq = 90
ampl = -15

[State 1052, 4]
type = VelAdd
trigger1 = Pos Y < 0 && !(AnimElemTime(14) >= 0 && AnimElemTime(24) < 0)
y = .44

[State 1052, 5]
type = VelSet
trigger1 = Pos Y > 0 || (AnimElemTime(14) >= 0 && AnimElemTime(24) < 0)
y = 0

[State 1052, 6]
type = PosSet
trigger1 = Pos Y > 0
y = 0

[State 1052, 7]
type = PlaySnd
trigger1 = AnimElem = 4
value = F7,2

[State 1052, 8]
type = SelfState
trigger1 = !gethitvar(isbound) && Time < 5
value = 5050

[State 1052, 9]
type = SelfState
trigger1 = Time > 77 && Pos Y > -Vel Y
value = 5100
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1053]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1054
sprpriority = 2

[State 1051, 1]
type = VarAdd
trigger1 = !Time && Fvar(21) > .3
fvar(21) = -0.15
ignorehitpause = 1
persistent = 0

[State 1051, 2]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
pos = 26*const(size.xscale),0

[State 1051, 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = 12*const(size.xscale),0

[State 1051, 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -20*const(size.xscale),-26*const(size.yscale)

[State 1051, 5]
type = TargetBind
trigger1 = AnimElemTime(5) = 0
trigger2 = AnimElemTime(9) >= 0 && AnimElemTime(9) <= 9
pos = 26*const(size.xscale),0

[State 1051, 6]
type = Explod
trigger1 = AnimElem = 8
anim = 6001
ID = 6000
pos = ceil((28-12*(AnimElem = 8))*const(size.xscale)),ceil((-14-14*(AnimElem = 8))*const(size.yscale))
postype = p1
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1

[State 1051, 7]
type = Turn
trigger1 = AnimElem = 4

[State 1051, 8]
type = PosAdd
trigger1 = FrontEdgeBodyDist < 20 && AnimElem = 4
x = -20

[State 1051, 9]
type = TargetFacing
trigger1 = NumTarget && AnimElem = 4
value = -1

[State 1051, 10]
type = TargetLifeAdd
trigger1 = (AnimElem = 5 || AnimElem = 9) && !Var(10)
value = ceil((-100+50*(AnimElem = 9))*FVar(20))

[State 1051, 11]
type = TargetLifeAdd
trigger1 = (AnimElem = 5 || AnimElem = 9) && Var(10)
value = ceil((-100+20*(AnimElem = 9))*FVar(20))

[State 1051, 12]
type = SprPriority
trigger1 = AnimElem = 3
value = -3

[State 1051, 13]
type = SprPriority
trigger1 = AnimElem = 5
value = 3

[State 1051, 14]
type = PowerAdd
trigger1 = !Time
value = 180 + 30 * Var(10)

[State 1051, 15]
type = PlaySnd
trigger1 = AnimElem = 9
value = F5,2

[State 1051, 16]
type = PlaySnd
trigger1 = AnimElem = 5
value = F0,3

[State 1051, 17]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1051, 18]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1051, 19]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1054]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 1052, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1052

[State 1052, 2]
type = VelSet
trigger1 = AnimElem = 4
y = -6.75

[State 1052, 3]
type = VelSet
trigger1 = AnimElem = 24
x = -3.3
y = -7.6

[State 1052, 4]
type = VelAdd
trigger1 = AnimElemTime(4) >= 0 && Pos Y < 0
y = .44

[State 1052, 5]
type = VelSet
trigger1 = Pos Y > 0
y = 0

[State 1052, 6]
type = PosSet
trigger1 = Pos Y > 0
y = 0

[State 1052, 7]
type = PlaySnd
trigger1 = AnimElem = 4
value = F7,2

[State 1052, 8]
type = SelfState
trigger1 = !gethitvar(isbound) && Time < 5
value = 5050

[State 1052, 9]
type = SelfState
trigger1 = Time > 77 && Pos Y > -Vel Y
value = 5100
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1055]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 1052, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1055

[State 1052, 2]
type = VelSet
trigger1 = AnimElem = 5
y = -5.75

[State 1052, 3]
type = VelSet
trigger1 = AnimElem = 24
x = -1.3
y = -8.6

[State 1051, 6]
type = EnvShake
trigger1 = AnimElem = 4
time = 18
freq = 90
ampl = -15

[State 1052, 4]
type = VelAdd
trigger1 = Pos Y < 0 && !(AnimElemTime(15) >= 0 && AnimElemTime(24) < 0)
y = .44

[State 1052, 5]
type = VelSet
trigger1 = Pos Y > 0 || (AnimElemTime(15) >= 0 && AnimElemTime(24) < 0)
y = 0

[State 1052, 6]
type = PosSet
trigger1 = Pos Y > 0
y = 0

[State 1052, 7]
type = PlaySnd
trigger1 = AnimElem = 4
value = F7,2

[State 1052, 8]
type = SelfState
trigger1 = !gethitvar(isbound) && Time < 5
value = 5050

[State 1052, 9]
type = SelfState
trigger1 = Time > 77 && Pos Y > -Vel Y
value = 5100
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1060]
type    = S
movetype= A
physics = S
velset = 0,0
poweradd = -500
ctrl = 0
anim = 1060
sprpriority = 2
facep2 = 1

[State 1060, 1]
type = HitDef
Trigger1 = P2MoveType != H && AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
attr = S, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 1061
p2stateno = 1063
guard.dist = 0
fall = 1
fall.recovertime = 1
numhits = 0

[State 1060, 2]
type = PlaySnd
trigger1 = AnimElem = 2
value = F720,0

[State 1060, 3]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 1060, 4]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8035
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1060, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8035
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1060, 6]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1060, 7]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1060, 8]
type = PlaySnd
trigger1 = AnimElem = 1
value = F799,0

[State 1060, 9]
type = ChangeState
Trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1061]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1061
sprpriority = 2

[State 1061, 1]
type = VarAdd
trigger1 = !Time && Fvar(21) > .3
fvar(21) = -0.15
ignorehitpause = 1
persistent = 0

[State 1061, 2]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(4) < 0
pos = 26*const(size.xscale),0

[State 1061, 3]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -3*const(size.xscale),-20*const(size.yscale)

[State 1061, 4]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = -21*const(size.xscale),-34*const(size.yscale)

[State 1061, 5]
type = SprPriority
trigger1 = AnimElem = 4 || AnimElem = 6
value = -3

[State 1061, 6]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

[State 1061, 7]
type = VelSet
trigger1 = Time = 35
x = 3.4*const(size.xscale)
y = -9.4*const(size.yscale)

[State 1061, 8]
type = VelAdd
trigger1 = Time >= 35
y = .44*const(size.yscale)

[State 1061, 9]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1061, 10]
type = PlaySnd
trigger1 = Time = 35
value = 40,0
persistent = 1

[State 1061, 11]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 1061, 12]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1062
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1062]
type    = A
movetype= A
physics = N
anim = 1062
velset = 0,0
ctrl = 0
sprpriority = 2

[State 1061, 4]
type = TargetBind
trigger1 = Anim = 1062 && AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = -14*const(size.xscale),-22*const(size.yscale)

[State 1062, 1]
type = TargetBind
trigger1 =  Anim = 1062 && AnimElem = 2
pos = 7*const(size.xscale),-4*const(size.yscale)

[State 1062, 1]
type = TargetBind
trigger1 =  Anim = 1062 && AnimElem = 3
pos = 9*const(size.xscale),6*const(size.yscale)

[State 0, Width]
type = Width
trigger1 = Anim = 1062 && AnimElemTime(2) >= 0
edge = 8,8

[State 1061, 5]
type = SprPriority
trigger1 = Anim = 1062 && AnimElem = 2
value = -3

[State 1062, 1]
type = TargetState
trigger1 = NumTarget && Anim = 1062 && AnimElem = 3
value = 1064

[State 1062, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 1062, 2]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1062, 3]
type = TargetLifeAdd
trigger1 = Anim = 1062 && AnimElem = 3
value = ceil(-175*FVar(20))
kill = 1

[State 1062, 4]
type = ChangeAnim
trigger1 = Anim = 1062 && !AnimTime 
value = 1065

[State 1062, 4]
type = ChangeAnim
trigger1 = Anim = 1065 && !AnimTime 
value = 43

[State 1062, 6]
type = VelSet
trigger1 = Anim = 1065 && AnimElem = 1 
x = -1.8
y = -4.3
persistent = 1

[State 1062, 7]
type = StateTypeSet
trigger1 = Anim = 1065 && AnimElem = 1 
statetype = A
physics = A
persistent = 1

[State 1061, 11]
type = PlaySnd
trigger1 = Anim = 1062 && AnimElem = 2
value = F0,3
persistent = 1

[State 1062,8]
type = PlaySnd
trigger1 = Anim = 1062 && AnimElem = 3
value = F7,2


[State 1062, 9]
type = EnvShake
trigger1 = Anim = 1062 && AnimElem = 3
time = 18
freq = 90
ampl = -15

[State 1060, 6]
type = RemoveExplod
trigger1 = Anim = 1065 && AnimElem = 1 
id = 8030

[State 1062, 10]
type = PlaySnd
trigger1 = Anim = 1065 && AnimElem = 1
value = 40,0
persistent = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1063]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 1063, 1]
type = SelfState
trigger1 = !gethitvar(isbound) && Time < 5
value = 5050

[State 1063, 2]
type = ChangeAnim2
trigger1 = !Time
value = 1063
;---------------------------------------------------------------------------
;Earth Shatter
[Statedef 1064]
type    = L
movetype= H
physics = S
velset = 0,0
ctrl = 0
sprpriority = -2
sprpriority = -2

[State 1063, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1064

[State 1064, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 1064, 2]
type = ChangeAnim
trigger1 = !Time
value = 5100

[State 726, 3]
type = NotHitBy
trigger1 = 1
value = SCA,AT
time = 1

[State 726, 4]
type = VelSet
trigger1 = Time = 15
x = -2.1

[State 727, 5]
type = ChangeAnim
trigger1 = Life && Time = 15
value = 5110
 
[State 727, 6]
type = PlayerPush
trigger1 = 1
value = 0

[State 727, 7]
type = SelfState
trigger1 = Life && Time = 15
value = 5101
 
[State 727, 8]
type = SelfState
trigger1 = !Life && Time = 15
value = 5810
;---------------------------------------------------------------------------
;Drill In
[Statedef 1100]
type    = S
movetype= I
physics = S
poweradd = 30-30*var(53)
velset = 0,0
anim = 1100+(2*(!var(59) && Cond(Var(44),NumExplod(90000210) != 0,NumExplod(90000240) != 0) || var(59) && P2BodyDist X > 60))
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1100, 1]
type = VarSet
trigger1 = !Time
var(10) = (!var(59) && Cond(Var(44),NumExplod(90000210) != 0,NumExplod(90000240) != 0) || var(59) && P2BodyDist X > 60)

[State 1100, 2]
type = Null
trigger1 = Time >= 15
x = .85

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = (8.5+8.5*((!var(59) && Var(10))|| Var(53) || (var(59) && P2BodyDist X > 60)))*const(size.xscale)

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 1100, 3]
type = PlaySnd
trigger1 = !Time
value = S1100,0

[State 1100, 4]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8032
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1100, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8032
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1100, 6]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1100, 7]
type = ChangeState
trigger1 = !Var(10) && Time = 10 && ((!var(59) && Cond(Var(44),Command = "holdx",Command = "holda")) || var(59))
trigger2 = ((Var(10) && Cond(Var(44),Command = "holdy",Command = "holdb") || Var(53) || var(59)) && Time = 16)
value = 1101

[State 1100, 5]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1 
;---------------------------------------------------------------------------
;Drill In
[Statedef 1101]
type    = S
movetype= A
physics = S
anim = 1101+(2*Var(10))
poweradd = 30-30*var(53)
ctrl = 0
sprpriority = 2

[State 1101, 1]
type = Null
trigger1 = !Var(10) && Time > 5
trigger2 = (Var(10) || Var(53)) && Time > 1
x = .85

[State 1101, 2]
type = PlaySnd
trigger1 = AnimElem = 2
value = S181,3

[State 1101, 3]
type = HitDef
trigger1 = Var(5) < 6 && AnimElem = 2
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
priority = 4,Hit
getpower = 18*(1-var(53)),9*(1-var(53)) 
givepower = 9,5
damage = ceil(35*Fvar(20)),8
pausetime = 10,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 20
guard.slidetime = 18
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = 0, -1.6*const(size.yscale)
yaccel = .35*const(size.yscale)
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1101, 4]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount < (4 + 2*Var(10))
trigger1 = AnimElem = 4 || AnimElem = 5 || (Var(10) && (AnimElem = 6 || AnimElem = 7))
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
priority = 4,Hit
getpower = 18*(1-var(53)),9*(1-var(53)) 
givepower = 9,5
damage = ceil(15*Fvar(20)),3
pausetime = 8,10
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = Low
ground.slidetime = 14+(4*Var(10))
guard.slidetime = 12
ground.hittime = 14+(4*Var(10))
guard.hittime = 12
ground.velocity = 0
guard.velocity = -4.8*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = 0, -0.1*const(size.yscale)
yaccel = .35*const(size.yscale)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4.8*const(size.xscale)
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1101, 4]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount < (4 + 2*Var(10))
trigger1 = (!Var(10) && AnimElem = 6) || (Var(10) && AnimElem = 8)
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
priority = 4,Hit
getpower = 18*(1-var(53)),9*(1-var(53)) 
givepower = 9,5
damage = ceil(15*Fvar(20)),3
pausetime = 8,10
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = Low
ground.slidetime = 14+(4*Var(10))
guard.slidetime = 12
ground.hittime = 14+(4*Var(10))
guard.hittime = 12
ground.velocity = -4.8*const(size.xscale)
guard.velocity = -4.8*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = -1.8*const(size.xscale), -2.1*const(size.yscale)
yaccel = .35*const(size.yscale)
ground.cornerpush.veloff = -4.8
guard.cornerpush.veloff = -4.8*const(size.xscale)
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1101, 5]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1101, 6]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1101, 7]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1 
;---------------------------------------------------------------------------
;Drill In
[Statedef 1110]
type    = S
movetype= A
physics = S
poweradd = -500
velset = 0,0
anim = 1110
ctrl = 0
sprpriority = 2
facep2 = 1

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 21

[State 1110, 2]
type = HitDef
trigger1 = Var(5) < 6 && AnimElem = 3
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 9,5
priority = 4,Hit
damage = ceil(30*Fvar(20)),7
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 20
guard.slidetime = 18
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = 0, -1.6*const(size.yscale)
yaccel = .35*const(size.yscale)
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1110, 2]
type = HitDef
trigger1 = Var(5) < 6 && AnimElem = 4
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 9,5
priority = 4,Hit
damage = ceil(60*Fvar(20)),15
pausetime = 10,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 20
guard.slidetime = 18
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = 0, -1.6*const(size.yscale)
yaccel = .35*const(size.yscale)
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1110, 3]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = AnimElem = 5 || AnimElem = 6 || AnimElem = 7 || AnimElem = 8 || AnimElem = 9
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 9,5
priority = 4,Hit
damage = ceil(5*Fvar(20)),2
pausetime = 8,10
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = Low
ground.slidetime = 20
guard.slidetime = 18
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0
guard.velocity = -4.8*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = 0
yaccel = .35*const(size.yscale)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -4.8*const(size.xscale)
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1110, 3]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = AnimElem = 10
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 9,5
priority = 4,Hit
damage = ceil(5*Fvar(20)),2
pausetime = 8,10
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = Low
ground.slidetime = 20
guard.slidetime = 18
ground.hittime = 20
guard.hittime = 18
ground.velocity = -4.8*const(size.xscale)
guard.velocity = -4.8*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = -1.8*const(size.xscale), -4.8*const(size.yscale)
yaccel = .35*const(size.yscale)
ground.cornerpush.veloff = -4.8*const(size.xscale)
guard.cornerpush.veloff = -4.8*const(size.xscale)
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1110, 4]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1110, 5]
type = NotHitBy
trigger1 = Time >= 0 && Time < 10
value = ,AP
time = 1

[State 1110, 6]
type = AssertSpecial
trigger1 = (Time >= 0 && Time < 10) && GameTime % 2 = 0
flag = invisible

[State 1110, 7]
type = PlaySnd
trigger1 = !Time
value = S1100,0

[State 1110, 8]
type = PlaySnd
trigger1 = AnimElem = 4
value = S181,3

[State 1110, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8036
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1110, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8036
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1110, 11]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1110, 12]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1110, 13]
type = PlaySnd
trigger1 = AnimElem = 1
value = F799,0

[State 1110, 14]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1 
;---------------------------------------------------------------------------
;Rock Drop
[Statedef 1150]
type    = S
movetype= I
physics = S
poweradd = 60-60*var(53)
anim = 1150
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1150, 1]
type = VarSet
trigger1 = !Time
var(10) = ((!var(59) && Cond(Var(44),NumExplod(90000240) != 0,NumExplod(90000240) != 0)) || (var(59) && PrevStateNo = 430))

[State 1150, 2]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A
movetype = A
physics = N

[State 1150, 3]
type = VelSet
trigger1 = AnimElem = 5
x = (4.8+(2.7*Var(10))+(2.7*Var(53)))*const(size.xscale)
y = (-4.2-(2.8*Var(10))-(2.8*var(53)))*const(size.yscale)

[State 1150, 4]
type = VelMul
trigger1 = AnimElemTime(5) >= 0
x = Cond(Var(10),.998,.95)

[State 1150, 5]
type = HitDef
trigger1 = Var(5) < 6 && !Time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 60*(1-var(53)), 30*(1-var(53))
givepower = 30,15
priority = 4,Hit
damage = ceil((20+(10*Var(10)))*FVar(20)),5+(2*Var(10))
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-15*const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = High
ground.slidetime = 18
ground.hittime = 18
guard.hittime = 16
guard.slidetime = 16
ground.velocity = Cond(Var(10),-2.2*const(size.xscale),-1.8),-6.2*const(size.yscale)
guard.velocity = -2.8*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = -1.6*const(size.xscale), -5.4*const(size.yscale)
yaccel = .35*const(size.yscale)
fall = 1
fall.recover = 0
id = 1150
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1150, 6]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1150, 7]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8033
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1150, 8]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8033
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1150, 9]
type = Width
trigger1 = AnimElemTime(4) >= 0 
player = -9,-9

[State 1150, 10]
type = PlaySnd
trigger1 = AnimElem = 5
value = S1150,0

[State 1150, 11]
type = ChangeState
trigger1 = Time = 22 ;ifelse(Var(10),Time = 35,Time = 22)
value = 1151
;---------------------------------------------------------------------------
;Rock Drop (Fall)
[Statedef 1151]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1151+(5*Var(10))
ctrl = 0
sprpriority = 2
hitcountpersist = 1

[State 1151, 1]
type = VelSet
trigger1 = !Time
y = -2.2*const(size.yscale)

[State 1151, 2]
type = VelAdd
trigger1 = Time < 12
y = .1*const(size.yscale)

[State 1151, 3]
type = VelSet
trigger1 = AnimElem = 3
y = 6.3*const(size.yscale)

[State 1151, 4]
type = VelAdd
trigger1 = AnimElemTime(3) >= 0
y = .44*const(size.yscale)

[State 1151, 5]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = !Time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 60*(1-var(53)), 30*(1-var(53))
givepower = 30,15
priority = 4,Hit
damage = ceil(100*Fvar(20)),25
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(0*const(size.yscale))
hitsound = F5,4
guardsound = F6,0
ground.type = High
ground.slidetime = 24
guard.slidetime = 22
ground.hittime = 24
guard.hittime = 22
ground.velocity = 0
guard.velocity = -3.8
air.type = Low
air.hittime = 100
air.velocity = 0,0
fall = 0
fall.recover = 0
id = 1151
chainID = -1
nochainID = -1
hitonce = 0
kill = 0
guard.kill = 0
fall.kill = 0
numhits = 1

[State 1151, 6]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1151, 7]
type = TargetState
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 12
value = 1153
ignorehitpause = 1

[State 1151, 8]
type = TargetBind
triggerall = NumTarget && MoveHit
trigger1 = AnimElemTime(3) >= 0 && target,StateType = A
time = 1
pos = 12*const(size.xscale),12*const(size.yscale)
ignorehitpause = 1

[State 1151, 9]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1150,1

[State 1151, 10]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
trigger2 = NumTarget && Vel Y > 0 && Pos Y >= -20
trigger2 = target,StateNo = 1153
value = 1152
;---------------------------------------------------------------------------
;Rock Drop (Land)
[Statedef 1152]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 1152
ctrl = 0
sprpriority = 2

[State 1152, 1]
type = PosSet
trigger1 = !NumTarget && !Time
trigger2 = NumTarget && !Time
trigger2 = target,StateNo != 1153 || target,StateNo != 1154 
y = 0

[State 1152, 2]
type = TargetState
triggerall = NumTarget && !Time
trigger1 = target,StateNo = 1153
value = 1154
ID = -1

[State 1152, 3]
type = TargetLifeAdd
trigger1 = NumTarget && !Time
trigger1 = target,StateNo = 1153 || target,StateNo = 1154 
value = ceil(-20*Fvar(20))

[State 1162, 4]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 914
ID = 914
pos = ceil(13*const(size.xscale)),ceil(-6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -2.9*const(size.xscale),-4.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1162, 5]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 915
ID = 915
pos = ceil(13*const(size.xscale)),ceil(6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -3.9*const(size.xscale),-2.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1162, 6]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 916
ID = 916
pos = ceil(14*const(size.xscale)),ceil(-6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 2.9*const(size.xscale),-4.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1162, 7]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 917
ID = 917
pos = ceil(14*const(size.xscale)),ceil(6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 3.9*const(size.xscale),-2.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1152, 8]
type = ChangeAnim
trigger1 =  NumTarget && Anim = 1152 && AnimElem = 3
trigger1 = target,StateNo = 1154 
value = 40

[State 1152, 9]
type = ChangeAnim
trigger1 = Anim = 40 && !AnimTime 
value = 43

[State 1152, 10]
type = VelSet
trigger1 = Anim = 43 && AnimElem = 1
x = -2.1*const(size.xscale)
y = -3.3*const(size.yscale)
persistent = 1

[State 1152, 10]
type = StateTypeSet
trigger1 = Anim = 43 && AnimElem = 1 
statetype = A
physics = A
persistent = 1

[State 1152, 11]
type = PlaySnd
trigger1 = !Time
value = F7,2

[State 1152, 12]
type = EnvShake
triggerall = NumTarget && !Time
trigger1 = target,StateNo = 1154 
time = 18
freq = 90
ampl = -15

[State 1151, 8]
type = PlaySnd
trigger1 = !Time
value = S1150,2

[State 1151, 8]
type = PlaySnd
trigger1 = enemy,StateNo = 5610
value = S1150,3
persistent = 0

[State 1105, 6]
type = RemoveExplod
trigger1 = Anim = 1152 && !AnimTime
trigger2 = Anim = 43
id = 8030

[State 1152, 13]
type = ChangeState
trigger1 = Anim = 1152 && !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Rock Drop (Land)
[Statedef 1153]
type    = S
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -3

[State 1153, 1]
type = StateTypeSet
trigger1 = Pos Y > -Vel Y
statetype = L

[State 1153, 2]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A

[State 1153, 3]
type = ChangeAnim2
trigger1 = !Time && StateType != A
value = 1153

[State 1153, 4]
type = ChangeAnim2
trigger1 = !Time && StateType = A
value = 1154
ignorehitpause = 1

[State 1153, 5]
type = VelSet
trigger1 = Pos Y > -Vel Y 
y = 0

[State 1153, 6]
type = PosSet
trigger1 = Pos Y > -Vel Y 
y = 0

[State 1153, 7]
type = AssertSpecial
trigger1 = 1
flag = noautoturn

;---------------------------------------------------------------------------
;Rock Drop (Land)
[Statedef 1154]
type    = L
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -3

[State 1153, 1]
type = ChangeAnim2
trigger1 = !Time
value = 1154

[State 1153, 2]
type = VelSet
trigger1 = !Time
y = 0

[State 1153, 3]
type = PosSet
trigger1 = !Time 
y = 0

[State 1153, 4]
type = AssertSpecial
trigger1 = 1
flag = noautoturn

[State 1153, 5]
type = ChangeAnim
trigger1 = Life && Time = 15
value = 5110

[State 1153, 6]
type = SelfState
trigger1 = Life && Time = 40
value = 5120
 
[State 727, 7]
type = SelfState
trigger1 = !Life && !Time
value = 5610
;---------------------------------------------------------------------------
;EX Rock Drop
[Statedef 1160]
type    = S
movetype= I
physics = S
poweradd = -500
anim = 1160
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1160, 1]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A
movetype = A
physics = N

[State 1150, 2]
type = VelSet
trigger1 = AnimElem = 3
x = 7.8*const(size.xscale)
y = -6.8*const(size.yscale)

[State 1150, 3]
type = VelMul
trigger1 = AnimElemTime(5) >= 0
x = .998

[State 1160, 4]
type = HitDef
trigger1 = Var(5) < 6 && !Time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 30,15
priority = 4,Hit
damage = ceil(50*fvar(20)),12
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = High
ground.slidetime = 21
ground.hittime = 23
guard.hittime = 14
guard.slidetime = 11
ground.velocity = -1.8*const(size.xscale),-6.2*const(size.yscale)
air.type = Low
air.hittime = 100
air.velocity = -1.6*const(size.xscale), -5.4*const(size.yscale)
yaccel = .35*const(size.yscale)
fall = 1
fall.recover = 0
id = 1160
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1160, 5]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1160, 6]
type = Width
trigger1 = AnimElemTime(3) >= 0 
player = -9,-9

[State 1160, 7]
type = NotHitBy
trigger1 = AnimElemTime(4) < 0 
value = SCA
time = 1

[State 1160, 8]
type = AssertSpecial
trigger1 = AnimElemTime(4) < 0  && (GameTime % 2) = 0
flag = invisible

[State 1160, 9]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1150,0

[State 1160, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8037
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1160, 11]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8037
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1160, 12]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1160, 132]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1160, 14]
type = ChangeState
trigger1 = Time = 16 ;ifelse(Var(10),Time = 35,Time = 22)
value = 1161
;---------------------------------------------------------------------------
;Rock Drop (Fall)
[Statedef 1161]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1151
ctrl = 0
sprpriority = 2
hitcountpersist = 1

[State 1161, 1]
type = VelSet
trigger1 = !Time
y = -2.2*const(size.yscale)

[State 1161, 2]
type = VelAdd
trigger1 = Time < 8
y = .1*const(size.yscale)

[State 1161, 3]
type = VelSet
trigger1 = AnimElem = 3
y = 6.3*const(size.yscale)

[State 1161, 4]
type = VelAdd
trigger1 = AnimElemTime(3) >= 0
y = .44*const(size.yscale)

[State 1161, 5]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = !Time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 30,15
priority = 4,Hit
damage = ceil(100*fvar(20)),25
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,4
guardsound = F6,0
ground.type = High
ground.slidetime = 24
guard.slidetime = 22
ground.hittime = 24
guard.hittime = 22
ground.velocity = 0
guard.velocity = -3.8
air.type = Low
air.hittime = 100
air.velocity = 0,0
id = 1161
chainID = -1
nochainID = -1
hitonce = 0
kill = 0
guard.kill = 0
fall.kill = 0
numhits = 1

[State 1161, 6]
type = VarAdd
trigger1 = NumTarget(1161) && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1161, 7]
type = TargetState
triggerall = NumTarget(1161) && MoveHit
trigger1 = HitPauseTime = 12
value = 1153
ID = 1161
ignorehitpause = 1

[State 1161, 8]
type = TargetBind
triggerall = NumTarget(1161) && MoveHit
trigger1 = AnimElemTime(3) >= 0 
time = 1
pos = 12*const(size.xscale),12*const(size.yscale) 
ID = 1161
ignorehitpause = 1

[State 1161, 9]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1150,1

[State 1161, 10]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1161, 11]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
trigger2 = NumTarget && Vel Y > 0 && Pos Y >= -20
trigger2 = target(1161),StateNo = 1153
value = 1162
;---------------------------------------------------------------------------
;Rock Drop (Land)
[Statedef 1162]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 1152
ctrl = 0
sprpriority = 2

[State 1162, 1]
type = PosSet
trigger1 = !NumTarget && !Time
trigger2 = NumTarget && !Time
trigger2 = target(1161),StateNo != 1153 || target(1161),StateNo != 1154 
y = 0

[State 1162, 2]
type = TargetState
triggerall = NumTarget
trigger1 = target(1161),StateNo = 1153
value = 1154
ID = -1

[State 1162, 3]
type = TargetLifeAdd
trigger1 = NumTarget && !Time
trigger1 = target(1161),StateNo = 1153 || target(1161),StateNo = 1154 
value = ceil(-20*Fvar(20))

[State 1162, 4]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 914
ID = 914
pos = ceil(13*const(size.xscale)),ceil(-6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -2.9*const(size.xscale),-4.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1162, 5]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 915
ID = 915
pos = ceil(13*const(size.xscale)),ceil(6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -3.9*const(size.xscale),-2.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1162, 6]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 916
ID = 916
pos = ceil(14*const(size.xscale)),ceil(-6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 2.9*const(size.xscale),-4.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1162, 7]
type = Explod
trigger1 = Anim = 1152 && AnimElem = 2
anim = 917
ID = 917
pos = ceil(14*const(size.xscale)),ceil(6*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 3.9*const(size.xscale),-2.1*const(size.yscale)
accel = 0,.44*const(size.yscale)
random = 0,0
removetime = 50
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 1162, 8]
type = ChangeAnim
trigger1 =  NumTarget(1161) && Anim = 1152 && AnimElem = 3
trigger1 = target(1161),StateNo = 1154 
value = 40

[State 1162, 9]
type = ChangeAnim
trigger1 = Anim = 40 && !AnimTime 
value = 43

[State 1162, 10]
type = VelSet
trigger1 = Anim = 43 && AnimElem = 1
x = -2.1*const(size.xscale)
y = -3.3*const(size.yscale)
persistent = 1

[State 1162, 11]
type = StateTypeSet
trigger1 = Anim = 43 && AnimElem = 1 
statetype = A
physics = A
persistent = 1

[State 1162, 12]
type = PlaySnd
trigger1 = !Time
value = F7,2

[State 1162, 13]
type = EnvShake
trigger1 = NumTarget && !Time
trigger1 = target(1161),StateNo = 1154 
time = 18
freq = 90
ampl = -15

[State 1162, 14]
type = PlaySnd
trigger1 = !Time
value = S1150,2

[State 1162, 15]
type = PlaySnd
trigger1 = enemy,StateNo = 5610
value = S1150,3
persistent = 0

[State 1162, 16]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

;[State 1162, 17]
;type = RemoveExplod
;trigger1 = Anim = 1152 && !AnimTime
;trigger2 = Anim = 43
;id = 8030

[State 1162, 18]
type = ChangeState
trigger1 = Anim = 1152 && !AnimTime
value = 0
ctrl = 1
